package com.web;


import com.pojo.dto.Message;
import com.pojo.vo.CVideoVo;
import com.pojo.vo.PictureVo;
import com.service.CVideoService;
import com.service.PictureService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class PictureController {
    @Autowired
    PictureService pictureService;

    @PostMapping("/addPicture")//上传视频
    public Message<PictureVo> addPicture(PictureVo pictureVo) {
        return pictureService.add(pictureVo);
    }

    @PostMapping("/addPictureList")//批量上传视频
    public Message<List<PictureVo>> addPictureList(List<PictureVo> pictures) {
        return pictureService.addList(pictures);
    }


}
